export async function getDevices(type: "videoinput" | "audioinput" = "videoinput"): Promise<MediaDeviceInfo[]> {
  const devices = await navigator.mediaDevices.enumerateDevices();
  return devices.filter((device) => device.kind === type);
}

export const servers: RTCConfiguration = {
  iceServers: [
    {
      urls: ["stun:stun1.google.com:19302", "stun:stun2.google.com:19302"],
    },
  ],
};
